< previous page page_311 next page >

Page 311
Now what you need to do is cut all the menus items from the Employee Information form and then open up the MDI form and paste the menu items at the end of the forms control list.
EXERCISE
Paste Me
1. Cut all the menu items out of the Employee Information form.
2. Open the Main.frm file in Notepad or WordPad.
3. Locate the last ''End'' in the form description and paste in the items just before it.
4. Save both of the form changes youve made and exit from Notepad/WordPad.
5. Reopen your project and display the MDI form.
6. You should see that the menus are now displayed in the MDI form.
7. Click the File menu and then click the Employee menu item.
8. Add the following code:
Private Sub mnuFEmp_Click()
frmEmployee.Show
End Sub
This bit of code allows the main MDI form to display the Employee Information form. Youre not quite done yetthere are still some things you need to do to make this a true MDI application.

EXERCISE
Making an MDI Child Form
1. Open the Employee Information form in design mode.
2. Set the MDIChild property to True. This allows the Employee Information form to act as an MDI child form to the MDI parent.
3. Set the BorderStyle property to 1-Fixed Single so that the MDI form will not automatically resize the Employee Information form when its displayed.
4. Add a BAS module so that you can add a Sub Main() procedure to the application.

 
< previous page page_311 next page >

If you like this book, buy it!